package com.example.mylibrarybase.yumengmeng16.ui;

import android.os.Bundle;
import android.widget.TextView;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.base.baseui.BaseActivity;
import com.example.mylibrarybase.yumengmeng16.bean.radiobuttonbean;
import com.example.mylibrarybase.yumengmeng16.view.LinearLayoutViewGrup_16;

import java.util.ArrayList;

public class MainActivity_16_listmeun extends BaseActivity {

    private LinearLayoutViewGrup_16 mActivity_main_16_listmeun_linearLayoutViewGrup_16;
    private TextView mActivity_main_16_listmeun_tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_main_16_listmeun;
    }

    @Override
    public void initView() {
        mActivity_main_16_listmeun_linearLayoutViewGrup_16 = (LinearLayoutViewGrup_16) findViewById(R.id.activity_main_16_listmeun_LinearLayoutViewGrup_16);
        mActivity_main_16_listmeun_tv = (TextView) findViewById(R.id.activity_main_16_listmeun_tv);
        initData();
    }


    @Override
    public void initData() {
        ArrayList<radiobuttonbean> radiobuttonbeen = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            radiobuttonbeen.add(new radiobuttonbean(""+i,"内容"+i));
        }
        mActivity_main_16_listmeun_linearLayoutViewGrup_16.setList(radiobuttonbeen, new LinearLayoutViewGrup_16.CallBack() {
            @Override
            public void onItem(radiobuttonbean radiobuttonbean, int pos) {
                mActivity_main_16_listmeun_tv.setText(radiobuttonbean.item+pos);
            }
        });
    }
}
